package com.company.show.factorys.normal;


/**
 * @author yingfing
 * @create 2020--10--07 16:27
 * @describe
 */
public class Test {
    public static void main(String[] args) {
        SenderFactory factory = new SenderFactory();
        Sender email = factory.produce("email");
        email.send();
        Sender sms = factory.produce("sms");
        sms.send();

        SenderFactory1 factory1 = new SenderFactory1();
        Sender sender = factory1.produceEmail();
        sender.send();
        Sender sender1 = factory1.produceSms();
        sender1.send();

        Sender sender2 = SenderFactor2.produceEmail();
        sender2.send();
        Sender sender3 = SenderFactor2.produceSms();
        sender3.send();
    }
}
